#ifndef __MALLOC_H
#define __MALLOC_H


#ifndef NULL
#define NULL 0
#endif


#define MEM_BLOCK_SIZE			32  	  						
#define MEM_MAX_SIZE			8*1024  						
#define MEM_ALLOC_TABLE_SIZE	MEM_MAX_SIZE/MEM_BLOCK_SIZE 			 

struct _m_mallco_dev
{
	void (*init)(void);				
	unsigned char (*perused)(void);		  	
	unsigned char 	*membase;					
	unsigned short *memmap; 					
	unsigned char  memrdy; 					
};
extern struct _m_mallco_dev mallco_dev;	

void mymemset(void *s,unsigned char c,unsigned int count);	
void mymemcpy(void *des,void *src,unsigned int n);
void mem_init(void);					 
unsigned int mem_malloc(unsigned int size);		 		
unsigned char mem_free(unsigned int offset);		 		
unsigned char mem_perused(void);					

void myfree(void *ptr);  				
void *mymalloc(unsigned int size);				
void *myrealloc(void *ptr,unsigned int size);	
#endif













